﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using ZRT.RHPX.Core.Mvc.Filters;
using ZRT.RHPX.Core.User;

namespace ZRT.RHPX.Core.Mvc.Controllers
{
    [DefaultAuthorize]
    public class AuthorizeController : Controller
    {
        /// <summary>
        /// 当前登录用户
        /// </summary>
        public UserEntity CurrentUser
        {
            get
            {
                var UserIdentityEntity = HttpContext.User.Identity as UserIdentity;
                if (UserIdentityEntity != null)
                    return UserIdentityEntity.CurretnUser;
                return null;
            }
        }
    }
}
